//////////////////////////////////////////////////////////////////////////////////
///
///
///
///date:create at 2021-03-16
///
/////////////////////////////////////////////////////////////////////////////////

#include <string>

#ifndef __I_COMPRESS_
#define __I_COMPRESS_

#if WIN32

#ifdef DLL_EXPORT_COMPRESS
#define DLL_API __declspec(dllexport)
#else
#define DLL_API __declspec(dllimport)
#endif // DLL_EXPORT

#endif // 


class DLL_API ICompress
{
public:
	virtual ~ICompress() {};
public:
	
	virtual bool Compress() = 0;
	virtual bool UnCompress() = 0;
public:

};

extern "C" DLL_API ICompress * createCompress();
extern "C" DLL_API void releaseCompress(ICompress *p);

#ifndef DLL_EXPORT_COMPRESS
#include <memory>
#include <functional>

typedef std::unique_ptr<ICompress, std::function<void(ICompress*)>> ICompressPtr;
inline std::unique_ptr<ICompress, std::function<void(ICompress*)>> getCompress()
{
	return std::unique_ptr<ICompress, std::function<void(ICompress*)>>(createCompress(), releaseCompress);
};
#endif

#endif // !__I_COMPRESS_